import request from '@/utils/request'

// 查询世界观设定列表
export function listWorldSetting(query) {
  return request({
    url: '/novel/worldSetting/list',
    method: 'get',
    params: query
  })
}

// 查询世界观设定详细
export function getWorldSetting(id) {
  return request({
    url: '/novel/worldSetting/' + id,
    method: 'get'
  })
}

export function getWorldSettingByProject(id) {
  return request({
    url: '/novel/worldSetting/project/' + id,
    method: 'get'
  })
}

// 新增世界观设定
export function addWorldSetting(data) {
  return request({
    url: '/novel/worldSetting',
    method: 'post',
    data: data
  })
}

// 修改世界观设定
export function updateWorldSetting(data) {
  return request({
    url: '/novel/worldSetting',
    method: 'put',
    data: data
  })
}

// 删除世界观设定
export function delWorldSetting(id) {
  return request({
    url: '/novel/worldSetting/' + id,
    method: 'delete'
  })
}
